package com.ntv.presentation.spring.web.user;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import com.ntv.domain.User;

public class NewUserFormController extends MultiActionController{
	private static final Logger logger = Logger.getLogger(NewUserFormController.class);
	
	
	
	
	
	@Override
	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse arg1) throws Exception 
	{
		ModelAndView mav = null;
		String command = request.getParameter("command");
		if("new".equals(command)) {
			Map model = new HashMap();				
			model.put("user", new User());
			mav = new ModelAndView("newuser.registration", model);	
		}
		else if("create".equals(command)) {
			
		}
		
		return mav;
	}
	
}
